<template>
  <div class="search-goods">
    <div class="flex">
      <div class="flex-item">
        <el-input size="medium" v-model="form.senderID" placeholder="发送者ID号"></el-input>
      </div>
      <div class="flex-item">
        <el-select size="medium" v-model="form.messageType" placeholder="选择消息类型">
          <el-option label="推广员申请消息" :value="0"></el-option>
          <el-option label="推广员申请驳回" :value="1"></el-option>
          <el-option label="推广员申请审核通过" :value="2"></el-option>
          <el-option label="推广的商品有购买意向提交" :value="3"></el-option>
          <el-option label="推广的商品已经退款" :value="4"></el-option>
          <el-option label="用户购买商品成功" :value="5"></el-option>
          <el-option label="用户退款成功" :value="6"></el-option>
          <el-option label="用户团购成功" :value="7"></el-option>
          <el-option label="用户团购失败" :value="8"></el-option>
        </el-select>
      </div>
      <!-- <div class="flex-item2">
        <el-date-picker
          v-model="date"
          size="medium"
          type="daterange"
          align="right"
          unlink-panels
          range-separator="至"
          start-placeholder="注册时间"
          end-placeholder="注册时间"
          :picker-options="pickerOptions"
        ></el-date-picker>
      </div> -->
      <el-button type="warning" size="small" plain icon="el-icon-search" @click="search">搜索</el-button>
      <el-button type="info" size="small" plain icon="el-icon-tickets" @click="output">导出表格</el-button>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
import { datePickerOptions } from '@/libs/time'

export default {
  name: 'search-user',
  data() {
    return {
      date: '',
      form: {
        senderID: '',
        messageType: ''
      },
      pickerOptions: datePickerOptions
    }
  },
  created() {
  },
  methods: {
    search() {
      this.$emit('search',this.form)
    },
    add() {
      this.$emit('add')
    },
    output() {
      this.$emit('output')
    }
  },
  watch: {
  }
}
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
@import '../style/mixin.styl'
.el-range-editor
  width 300px
.flex
  flex-row()
  margin 10px 0
  .flex-item
    flex 1
    flex-row()
    // width 170px
    margin-right 15px
    .el-select
      width 100%
  .flex-item2
    margin-right 15px
    width 300px
    display flex
    flex-row()
.kong
  padding 0 3px
</style>
